﻿<navigation:Page xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit" x:Class="OpenRPOSBackOffice.MenuItems" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"                 
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="800" d:DesignHeight="570" mc:Ignorable="d"
           Title="Menu Items Page" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
           Style="{StaticResource PageStyle}" Loaded="Page_Loaded"
           >
    <Grid x:Name="LayoutRoot" Margin="0,0,0,0">
        <sdk:Label x:Name="lblMenuItems" HorizontalAlignment="Left" Height="18" Margin="15,0,0,0" VerticalAlignment="Top" Width="120" Content="Menu Items"/>
        <ComboBox x:Name="cmbMenuItems" HorizontalAlignment="Left" Margin="15,18,0,0" VerticalAlignment="Top" Width="217" SelectionChanged="cmbMenuItems_SelectionChanged"/>
        <sdk:Label x:Name="lblShortName" HorizontalAlignment="Left" Height="18" Margin="256,0,0,0" VerticalAlignment="Top" Width="74" Content="Short Name"/>
        <TextBox x:Name="tbShortName" HorizontalAlignment="Left" Height="35" Margin="254,18,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="147" MaxLength="15"/>
        <sdk:Label x:Name="lblRecipes" HorizontalAlignment="Left" Height="17" Margin="429,0,0,0" VerticalAlignment="Top" Width="120" Content="Recipes"/>
        <ComboBox x:Name="cmbRecipes" HorizontalAlignment="Left" Margin="431,18,0,0" VerticalAlignment="Top" Width="171" SelectionChanged="cmbRecipes_SelectionChanged" Height="34"/>
        <Button x:Name="btnAddRecipe" Content="Add" HorizontalAlignment="Left" Margin="617,20,0,0" VerticalAlignment="Top" Width="50" Click="btnAddRecipe_Click"/>
        <Button x:Name="btnRemoveRecipe" Content="Remove" HorizontalAlignment="Left" Margin="672,20,0,0" VerticalAlignment="Top" Width="63" Click="btnRemoveRecipe_Click"/>
        <Button x:Name="btnEditRecipe" Content="Edit" HorizontalAlignment="Left" Margin="740,20,0,0" VerticalAlignment="Top" Width="50" Click="btnEditRecipe_Click"/>
        <Button x:Name="btnAddMenuItem" Content="Add" HorizontalAlignment="Left" Margin="15,53,0,0" VerticalAlignment="Top" Width="50" Click="btnAddMenuItem_Click"/>
        <Button x:Name="btnRemoveMenuItem" Content="Remove" HorizontalAlignment="Left" Margin="86,53,0,0" VerticalAlignment="Top" Width="70" Click="btnRemoveMenuItem_Click"/>
        <Button x:Name="btnEditMenuItem" Content="Edit" HorizontalAlignment="Left" Margin="182,53,0,0" VerticalAlignment="Top" Width="50" Click="btnEditMenuItem_Click"/>
        <sdk:Label x:Name="lblPrice" HorizontalAlignment="Left" Height="19" Margin="280,76,0,0" VerticalAlignment="Top" Width="28" Content="Price"/>
        <TextBox x:Name="tbPrice" HorizontalAlignment="Left" Height="35" Margin="314,62,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="87"/>
        <sdk:DataGrid x:Name="dgRecipeItems" AutoGenerateColumns="False" HorizontalAlignment="Left" Height="192" Margin="429,62,0,0" VerticalAlignment="Top" Width="361">
            <sdk:DataGrid.ColumnHeaderStyle>
                <Style  TargetType="sdk:DataGridColumnHeader" >
                    <Setter Property="FontSize" Value="10" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition GeneratedDuration="00:00:0.1" />
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>

                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#FF1F3B53" Grid.ColumnSpan="2" Grid.RowSpan="2"/>

                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>

                                    <ContentPresenter
                        Grid.RowSpan="2"
                        
                        Cursor="{TemplateBinding Cursor}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>

                                    <Rectangle Name="VerticalSeparator" Grid.RowSpan="2" Grid.Column="2" Width="1" VerticalAlignment="Stretch" />

                                    <Path Grid.RowSpan="2" Name="SortIcon" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Grid.Column="1" Stretch="Uniform" Width="8" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF444444" />
                                        </Path.Fill>
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform x:Name="SortIconTransform" ScaleX=".9" ScaleY=".9" />
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>

                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </sdk:DataGrid.ColumnHeaderStyle>
            <sdk:DataGrid.Columns>
                <sdk:DataGridTextColumn Header="Ingredient" Width="140" IsReadOnly="True" Binding="{Binding IngredientName}" CanUserReorder="False" CanUserResize="False" CanUserSort="False"/>
                <sdk:DataGridTextColumn Header="Units" Width="70" IsReadOnly="True" Binding="{Binding UnitName}"/>
                <sdk:DataGridTextColumn Header="Quantity" Width="50" IsReadOnly="True" Binding="{Binding Quantity}"/>
            </sdk:DataGrid.Columns>
        </sdk:DataGrid>
        <sdk:Label x:Name="lblMenuCategory" HorizontalAlignment="Left" Height="17" Margin="13,111,0,0" VerticalAlignment="Top" Width="84" Content="Menu Category"/>
        <ComboBox x:Name="cmbMenuCategory" HorizontalAlignment="Left" Margin="102,104,0,0" VerticalAlignment="Top" Width="185"/>
        <CheckBox x:Name="cbEnabled" Content="Enabled" HorizontalAlignment="Left" Margin="314,110,0,0" VerticalAlignment="Top" Padding="3,-3,0,0" Width="50" />
        <sdk:Label x:Name="lblMenuItemDescription" HorizontalAlignment="Left" VerticalAlignment="Top" Height="18" Margin="13,133,0,0" Width="89" Content="Description"/>
        <TextBox x:Name="tbDescription" HorizontalAlignment="Left" VerticalContentAlignment="Top" Height="112" Margin="10,150,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="391" VerticalScrollBarVisibility="Auto" MaxLength="250" />
        <CheckBox x:Name="cbRecipe" Content="Recipe" HorizontalAlignment="Left" Margin="10,279,0,0" Padding="3,-3,0,0" VerticalAlignment="Top" Checked="cbRecipe_Checked" Unchecked="cbRecipe_Unchecked"/>
        <ComboBox x:Name="cmbRecipe" HorizontalAlignment="Left" Margin="78,271,0,0" VerticalAlignment="Top" Width="179"/>
        <Button x:Name="btnOptions" Content="Options" HorizontalAlignment="Left" Margin="262,271,0,0" VerticalAlignment="Top" Width="67" Click="btnOptions_Click"/>
        <Button x:Name="btnUpdateMenuItem" Content="Update" HorizontalAlignment="Left" Margin="334,271,0,0" VerticalAlignment="Top" Width="65" Click="btnUpdateMenuItem_Click"/>
        <Button x:Name="btnAddRecipeItem" Content="Add" HorizontalAlignment="Left" Margin="429,272,0,0" VerticalAlignment="Top" Width="75" Click="btnAddRecipeItem_Click"/>
        <Button x:Name="btnRemoveRecipeItem" Content="Remove" HorizontalAlignment="Left" Margin="578,272,0,0" VerticalAlignment="Top" Width="75" Click="btnRemoveRecipeItem_Click"/>
        <Button x:Name="btnEditRecipeItem" Content="Edit" HorizontalAlignment="Left" Margin="715,272,0,0" VerticalAlignment="Top" Width="75" Click="btnEditRecipeItem_Click"/>
        <sdk:Label x:Name="lblMenuCategories" HorizontalAlignment="Left" Height="18" Margin="12,319,0,0" VerticalAlignment="Top" Width="120" Content="Menu Categories"/>
        <ListBox x:Name="lbMenuCategories" HorizontalAlignment="Left" Height="150" Margin="12,338,0,0" VerticalAlignment="Top" Width="187" SelectionChanged="lbMenuCategories_SelectionChanged"/>
        <Button x:Name="btnAddMenuCategory" Content="Add" HorizontalAlignment="Left" Margin="12,493,0,0" VerticalAlignment="Top" Width="46" Click="btnAddMenuCategory_Click"/>
        <Button x:Name="btnRemoveMenuCategory" Content="Remove" HorizontalAlignment="Left" Margin="63,493,0,0" VerticalAlignment="Top" Width="67" Click="btnRemoveMenuCategory_Click"/>
        <Button x:Name="btnUpMenuCategory" HorizontalAlignment="Left" Margin="147,493,0,0" VerticalAlignment="Top" Width="22" RenderTransformOrigin="0.5,0.5" Height="22" Click="btnUpMenuCategory_Click">
            <Path Fill="Black" Data="M 0 6 L 12 6 L 6 0 Z"/>
        </Button>
        <Button x:Name="btnDownMenuCategory" HorizontalAlignment="Left" Margin="175,493,0,0" VerticalAlignment="Top" Width="22" RenderTransformOrigin="0.5,0.5" Height="22" Click="btnDownMenuCategory_Click">
            <Path Fill="Black" Data="M 0 0 L 6 6 L 12 0 Z"/>
        </Button>
        <Button x:Name="btnEditMenuCategory" Content="Edit" HorizontalAlignment="Left" Margin="12,533,0,0" VerticalAlignment="Top" Width="45" Click="btnEditMenuCategory_Click"/>
        <CheckBox x:Name="cbMenuCategoryVisible" Content="Visible" HorizontalAlignment="Left" Margin="65,539,0,0" VerticalAlignment="Top" Padding="3,-3,0,0"/>
        <Button x:Name="btnUpdateMenuCategory" Content="Update" HorizontalAlignment="Left" Margin="134,533,0,0" VerticalAlignment="Top" Width="63" Click="btnUpdateMenuCategory_Click"/>
        <sdk:Label x:Name="lblIngredients" HorizontalAlignment="Left" Height="18" Margin="225,319,0,0" VerticalAlignment="Top" Width="120" Content="Ingredients"/>
        <ComboBox x:Name="cmbIngredients" HorizontalAlignment="Left" Margin="225,338,0,0" VerticalAlignment="Top" Width="173" SelectionChanged="cmbIngredients_SelectionChanged"/>
        <Button x:Name="btnAddIngredient" Content="Add" HorizontalAlignment="Left" Margin="225,370,0,0" VerticalAlignment="Top" Width="50" Click="btnAddIngredient_Click"/>
        <Button x:Name="btnRemoveIngredient" Content="Remove" HorizontalAlignment="Left" Margin="280,371,0,0" VerticalAlignment="Top" Width="63" Click="btnRemoveIngredient_Click"/>
        <Button x:Name="btnEditIngredients" Content="Edit" HorizontalAlignment="Left" Margin="348,370,0,0" VerticalAlignment="Top" Width="50" RenderTransformOrigin="2.9,0.818" Click="btnEditIngredients_Click"/>
        <sdk:Label x:Name="lblUnitOfMeasure" HorizontalAlignment="Left" Height="18" Margin="225,417,0,0" VerticalAlignment="Top" Width="113" Content="Unit of Measure"/>
        <ComboBox x:Name="cmbIngredientUnits" HorizontalAlignment="Left" Margin="225,436,0,0" VerticalAlignment="Top" Width="173"/>
        <sdk:Label x:Name="lblCostPerUnit" HorizontalAlignment="Left" Height="18" Margin="263,476,0,0" VerticalAlignment="Top" Width="76" Content="Cost Per Unit"/>
        <TextBox x:Name="tbCostPerUnit" HorizontalAlignment="Left" Height="22" Margin="343,468,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="55"/>
        <sdk:Label x:Name="lblCount" HorizontalAlignment="Left" Height="18" Margin="304,507,0,0" VerticalAlignment="Top" Width="33" Content="Count"/>
        <TextBox x:Name="tbCount" HorizontalAlignment="Left" Height="22" Margin="343,499,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="55"/>
        <Button x:Name="btnUpdateIngredients" Content="Update" HorizontalAlignment="Left" Margin="280,533,0,0" VerticalAlignment="Top" Width="67" RenderTransformOrigin="2.9,0.818" Click="btnUpdateIngredients_Click"/>
        <sdk:Label x:Name="lblOptionGroups" HorizontalAlignment="Left" Height="17" Margin="420,324,0,0" VerticalAlignment="Top" Width="120" Content="Option Groups"/>
        <ComboBox x:Name="cmbOptionGroups" HorizontalAlignment="Left" Margin="420,342,0,0" VerticalAlignment="Top" Width="179" SelectionChanged="cmbOptionGroups_SelectionChanged"/>
        <Button x:Name="btnAddOptionGroup" Content="Add" HorizontalAlignment="Left" Margin="420,376,0,0" VerticalAlignment="Top" Width="50" Click="btnAddOptionGroup_Click"/>
        <Button x:Name="btnRemoveOptionGroup" Content="Remove" HorizontalAlignment="Left" Margin="475,376,0,0" VerticalAlignment="Top" Width="69" Click="btnRemoveOptionGroup_Click"/>
        <Button x:Name="btnEditOptionGroup" Content="Edit" HorizontalAlignment="Left" Margin="549,376,0,0" VerticalAlignment="Top" Width="50" Click="btnEditOptionGroup_Click"/>
        <ListBox x:Name="lbOptions" HorizontalAlignment="Left" Height="111" Margin="420,413,0,0" VerticalAlignment="Top" Width="179"/>
        <Button x:Name="btnAddOptionGroupItem" Content="Add" HorizontalAlignment="Left" Margin="420,529,0,0" VerticalAlignment="Top" Width="75" Click="btnAddOptionGroupItem_Click"/>
        <Button x:Name="btnRemoveOptionGroupItem" Content="Remove" HorizontalAlignment="Left" Margin="524,529,0,0" VerticalAlignment="Top" Width="75" Click="btnRemoveOptionGroupItem_Click"/>
        <sdk:Label x:Name="lblUnits" HorizontalAlignment="Left" Height="18" Margin="617,324,0,0" VerticalAlignment="Top" Width="120" Content="Units"/>
        <ComboBox x:Name="cmbUnits" HorizontalAlignment="Left" Margin="617,344,0,0" VerticalAlignment="Top" Width="173"/>
        <Button x:Name="btnAddUnits" Content="Add" HorizontalAlignment="Left" Margin="617,376,0,0" VerticalAlignment="Top" Width="50" RenderTransformOrigin="0.74,0.5" Click="btnAddUnits_Click"/>
        <Button x:Name="btnRemoveUnits" Content="Remove" HorizontalAlignment="Left" Margin="672,376,0,0" VerticalAlignment="Top" Width="63" Click="btnRemoveUnits_Click"/>
        <Button x:Name="btnEditUnits" Content="Edit" HorizontalAlignment="Left" Margin="740,376,0,0" VerticalAlignment="Top" Width="50" Click="btnEditUnits_Click"/>
    </Grid>
</navigation:Page>
